package com.qinghong.gulimall.product.feign;

import com.qinghong.common.to.SkuReductionTo;
import com.qinghong.common.to.SpuBoundTo;
import com.qinghong.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("gulimall-coupon")
public interface CouponFeignService {

    /**
     *  @RequestBody 将对象转换为json
     *  找到服务，给发送请求
     *  对方收到请求，请求体里有json
     * @param spuBoundTo
     */
    @PostMapping("/coupon/spubounds/save")
    R saveSpuBounds(@RequestBody SpuBoundTo spuBoundTo);

    @PostMapping("/coupon/skufullreduction/saveinfo")
    R saveSkuReduction(@RequestBody SkuReductionTo skuReductionTo);
}
